<template>
  <transition name="slide">
    <div class="wrapper">
      <h2>Please close this window to continue.</h2>
    </div>
  </transition>
</template>

<script type="text/ecmascript-6">
    import hello from 'hellojs/dist/hello.all.js'
    export default {
      mounted() {
        window.onbeforeunload = function(){
          document.getElementsByTagName('h2')[0].innerHTML="Redirecting, please wait";
        }
      }
    }
</script>

<style scoped lang="stylus" rel="stylesheet/stylus">
  @import "~common/stylus/variable"
  @import "~common/stylus/mixin"

  .slide-enter-active, .slide-leave-active
    transition: all 0.3s
  .slide-enter, .slide-leave-to
    transform: translate3d(100%, 0, 0)
  .wrapper
    position: fixed
    top: 0
    left: 0
    bottom: 0
    right: 0
    z-index: 111
    color: #222
    background: $color-white
</style>
